<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="https://www.iconfont.cn/webfont" target="_blank">阿里免费字体申请链接 https://www.iconfont.cn/webfont </a>
<p>通过正则，提取网站内所有汉字，以及结尾补上所有字母和数字和常用符号，最终可用于申请免费字体</p>
<button onclick="start()">提取汉字</button>
<textarea>

</textarea>
<p>

</p>


<script>
    function start() {
        let textarea = document.querySelector('textarea');
        let p = document.querySelector('p');
        const value = textarea.value;
        const hanzi = value.match(/[\u4e00-\u9fa5]/g);
        p.innerHTML = Array.from(new Set(hanzi)).join('')
            + '0123456789~!@#$%^&*()_-+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    }
</script>
</body>
</html>